<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../jsLib/angular.js"></script>
    <title></title>
</head>
<body ng-app="app" ng-controller="myControl">
<input type="text" ng-model="bbbb">
<button ng-click="aa()">aa</button>
{{bb}}
<script>
    var app = angular.module('app',[]);
    app.factory('bqc',function(){
        return {
           aa:function(){
             alert(1)
           }
        }
    })
    app.controller('myControl',function($scope,bqc){
        $scope.aa = function(){
            bqc.aa();
        }

    })
 /*   app.factory('bqc',['$http',function($http){
      var request =function(url){
        return  $http({method:'GET',url:url});
      }
      return {
          http:function(url){
              return request(url,'http');
          }
      }
    }])
    app.controller('myControl',function($scope,bqc){
        bqc.http( '../php/test.php').success(function(response) {  $scope.bb = response;})
    })*/
</script>
</body>
</html>